54 change[
CHX] = fabs(baseline[
CHX] - sample[
CHX]);
55 change[
CHY] = fabs(baseline[
CHY] - sample[
CHY]);
56 change[
CHZ] = fabs(baseline[
CHZ] - sample[
CHZ]);
57 changed = (change[
CHX]>tolerance) ||
58 (change[CHY]>tolerance) ||
59 (change[
CHZ]>tolerance);
61 baseline[
CHX] = sample[
CHX];
62 baseline[
CHY] = sample[
CHY];
63 baseline[
CHZ] = sample[
CHZ];
66 if ((*count) <= winLength) (*count) += 1;
68 return(*count > winLength);
#define CHY
Used to access Y-channel entries in various data data structures.
bool motionCheck(float sample[3], float baseline[3], float tolerance, uint32_t winLength, uint32_t *count)
The motionCheck() function is not a sensor fusion function. It is a function that simply monitors an ...
The sensor_fusion.h file implements the top level programming interface.
#define CHX
Used to access X-channel entries in various data data structures.